<?php
require_once ("../dao/RateBasicMortgage.php");

$result = false;
$action = $_POST['act'];
if($action == 'lock') {
	if(isset($_POST['idre'])) {
		$id = $_POST['idre'];
		if(updateDisplayRateBasicMort($id, 0)) {
			$result = true;
		}
	}
} else if($action == 'unlock') {
	if(isset($_POST['idre'])) {
		$id = $_POST['idre'];
		if(updateDisplayRateBasicMort($id, 1)) {
			$result = true;
		}
	}
}

echo json_encode($result);
?>